#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
int a;
int main(void){
    while(~scanf("%d",&a)){
        if(a<0 || a>100){
            printf("Score is error!\n");
        }
        else if(a<=59){
            printf("E\n");
        }
        else if(a<=69){
            printf("D\n");
        }
        else if(a<=79){
            printf("C\n");
        }
        else if(a<=89){
            printf("B\n");
        }
        else{
            printf("A\n");
        }
    }
    return 0;
}
